local UserWrapLayer = class("UserWrapLayer", require "widget/BaseUI")
 
function UserWrapLayer.show()
    print("============UserWrapLayer.show===============")
 
    local win = UserWrapLayer.new()

    local data = getWndInitParamList()
    data.isRemoveResource = false
    data.imgTitle = nil
    data.bgImage = nil
    data.isShowCover = false,

    win:init(data)
    win:showWindow()

    return win

end

function UserWrapLayer:ctor() 
    UserWrapLayer.super:ctor();
end


function UserWrapLayer:init(data)
    self:initWithParas(data)
    
    self.m_Json = ccs.GUIReader:getInstance():widgetFromJsonFile("image/ui/Json/LayerUserWrap.json")
    self:setContentSize(self.m_Json:getContentSize())
    self.m_Json:setPositionX(-self.m_Json:getContentSize().width/2)
    self.m_Json:setPositionY(-self.m_Json:getContentSize().height/2)
    self:addChild(self.m_Json)
    
    self.m_ScrollView = self.m_Json:getChildByName("ld_wh_ScrollView")

    self.m_BtnBack = self.m_Json:getChildByName("lu_bt_back")
    self.m_BtnBack:setTouchEnabled(true)
    self.m_BtnBack:addTouchEventListener(function(sender,eventType)self:onMenutClick(sender,eventType) end)

  
end


function UserWrapLayer:onMenutClick(sender,eventType)
    if eventType == ccui.TouchEventType.ended then
        if sender == self.m_BtnBack then     
            print "=========UserWrapLayer:onMenutClick m_BtnBack======================="
            self:closeWindow()
        end
    end
end
 
return UserWrapLayer